<template>
  <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
    <!-- <span>这是一段信息</span> -->
    <el-form label-width="100px">
      <el-form-item label="订单状态">
        <el-input v-model="stateObj[$parent.row.state]" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="订单类型">
        <el-input v-model="typeObj[$parent.row.type]" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="订单编号">
        <el-input v-model="$parent.row.number" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="姓名">
        <el-input v-model="$parent.row.name" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="科室">
        <el-input v-model="$parent.row.keshi" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="接诊医生">
        <el-input v-model="$parent.row.doctor" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="收费日期">
        <el-input v-model="$parent.row.date" :readonly="true"></el-input>
      </el-form-item>
      <el-form-item label="收费员">
        <el-input v-model="$parent.row.person" :readonly="true"></el-input>
      </el-form-item>
    </el-form>
    <!-- 结束 -->
    <span slot="footer" class="dialog-footer">
      <el-button @click="$parent.isShow=false">关 闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: ["row"],
  data() {
    return {
      dialogVisible: true,
      name: "",
      row2: "",
      stateObj: {
        0: "已收费",
        1: "未收费"
      },
      typeObj: {
        0: "处方开立",
        1: "不处方开立"
      }
    };
  },
  // watch: {
  //   row(curr, per) {
  //     this.row2 = object.assign({}, curr);
  //     // console.log(curr, "===");
  //     // console.log(per, "===");
  //     // console.log(row, "===");
  //   }
  // },
  methods: {
    handleClose() {
      // this.$confirm("确认关闭？")
      //   .then(_ => {
      //     done();
      this.$parent.isShow = false;
      // })

      // .catch(_ => {});
    }
  }
};
</script>

<style lang="less" scoped>
/deep/.el-dialog__body {
  padding: 10px 20px;
}
/deep/.el-form-item {
  margin-bottom: 10px;
}
/deep/.el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
  margin-bottom: 10px;
}
</style>